{include file="public/header" /}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.css"}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.js"}
<style>
    #des, #des input {
        width: 40px;
        text-align: center;
    }

    #id {
        width: 78px;
    }

    .bs-checkbox {
        width: 36px;
        height: 40px
    }

    .fixed-table-toolbar .columns, .fixed-table-toolbar .search {
        margin-left: 0px;
        margin-top: 0px
    }

    #title span {
        float: right;
    }

    .asdlkjasd {
        background: #1ab394;
        color: #fff
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content {:config('adminClass.main')}">
    <div class="ibox float-e-margins">
        {include file="public/tophead"}
        {include file="public/top" /}
        <div class="ibox-content">
            {include file="public/topsection"}
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="example">
                        <form class="form-horizontal" method="post">
                            <table data-toggle="table">
                                <thead>
                                <tr>
                                    <th data-align="center">类型</th>
                                    <th data-align="center">名称</th>
                                    <th data-align="center">人数</th>
                                    <th data-align="center">排序</th>
                                    <th data-align="center">状态</th>
                                    <th data-align="center">管理</th>
                                </tr>
                                </thead>
                                <tbody id="form">
                                {volist name="data" id="v"}
                                <tr class="class">
                                    <td>
                                        {switch name="v.types"}
                                            {case value="6"}魅力榜{/case}
                                            {case value="3"}富豪榜{/case}
                                            {case value="2"}女神榜{/case}
                                            {case value="5"}家族榜{/case}
                                            {case value="8"}邀请榜{/case}
                                            {case value="1"}恩爱榜{/case}
                                        {/switch}
                                    </td>
                                    <td>{$v.name}</td>
                                    <td>{$v.show_count}</td>
                                    <td>{$v.sort}</td>
                                    <td>
                                        {switch name="v.is_hidden"}
                                            {case value="1"}<span class="btn btn-default btn-xs">隐&nbsp;&nbsp;&nbsp;藏</span>{/case}
                                            {case value="0"}<span class="btn btn-primary btn-xs">显&nbsp;&nbsp;&nbsp;示</span>{/case}
                                        {/switch}
                                    </td>
                                    <td>
                                        <div class="btn-group">
                                            <div data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">操作 <span class="caret"></span>
                                            </div>
                                            <ul class="dropdown-menu">
                                                <li><a onClick="add('{:url('addRanking',['id'=>$v['id'], 'url' => -1])}')">修改</a></li>
                                            </ul>
                                        </div>
                                    </td>
                                </tr>
                                {/volist}
                                </tbody>
                            </table>
                        </form>
                    </div>
                </div>
            </div>
            <hr>
            <div class="row row-lg">
                <div class="col-sm-12 pages">{$page}</div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}

<script type="text/javascript">

    $(document).ready(function(){
        $('#delidAll').click(function(){
            $('input[type=checkbox]').each(function(){
                var self=$(this);
                if(!self.prop('checked')){
                    self.prop('checked',true);
                }else{
                    self.prop('checked',false);
                }
            });
        })
    });
</script>
